//
//  BaseViewController.swift
//  BaseModule_Example
//
//  Created by seven on 2020/7/1.
//  Copyright © 2020 CocoaPods. All rights reserved.
//

import UIKit
import BaseModule



class BaseViewController: UIViewController {
    
    /// 反正箭头名称
    static let backImageName = "左箭头_18"
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.logEnabled = true
        
        LogUtil.addLog("😂-->LogUtil tableView(_:heightForRowAt:) 第 199 行 <---😂0.0")
        
        if let count = navigationController?.viewControllers.count,
            count > 1 {
            let image = UIImage(named: BaseViewController.backImageName)
            let item = UIBarButtonItem(image: image, style: UIBarButtonItemStyle.done, target: self, action: #selector(_backAction))
            navigationItem.leftBarButtonItem = item;
        }

        LogUtil.addLog("😂-->LogUtil tableView(_:heightForRowAt:) 第 199 行 <---😂0.0")
        //        // 设置导航条透明，去掉需要将图片置空
        //        self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
        //        self.navigationController?.navigationBar.shadowImage = UIImage()
        
        LogUtil.addLog("😂-->LogUtil tableView(_:heightForRowAt:) 第 199 行 <---😂0.0")
    }
    
    @objc func _backAction() {
        navigationController?.popViewController(animated: true)
    }
    
}


